package com.pig4cloud.pig.village.api.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@TableName("global_sequence")
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class GlobalSequence {
	@TableId(value = "id", type = IdType.ASSIGN_ID)
	private Long id;
	//yyyyMMdd前缀
	private String name;
	//当前值
	private Integer value;
	//步长：increment为mysql的保留字段故改为此
	private Integer incre;

	private String createBy;
	private LocalDateTime createTime;
	private String updateBy;
	private LocalDateTime updateTime;
	@TableLogic(value = "0", delval = "1")
	private int delFlag;
	private int tenantId;
}
